package com.mx.kn.cstf2.service.impl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mx.kn.cstf2.dao.MainDao;
import com.mx.kn.cstf2.service.MainService;

import kn.cstf2.assign.Bean.ListaTablaBean;

@Service
public class MainServiceImpl implements MainService {

	@Autowired
	private MainDao mainDao;
	
	
	public void updatedFalse(Integer knkey, Integer id) {
		mainDao.updatedFalse(knkey, id);
	}

	public void updatedTrue(Integer knkey, Integer id ) throws SQLException {
		mainDao.updatedTrue(knkey, id);
	}

	
	public void updatedTrue1(Integer knkey) throws SQLException {
		mainDao.updatedTrue1(knkey);
	}

	@Override
	public ArrayList<ListaTablaBean> getClientes() throws SQLException {
		return mainDao.getClientes();
	}

	@Override
	public ListaTablaBean getCliente(Integer knKey) throws SQLException {
		return mainDao.getCliente(knKey);
	}

	@Override
	public void insertClient(Integer idUser, Integer idTransition) {
		mainDao.insertClient(idUser, idTransition);
	}

	@Override
	public boolean validaExistenciaCliente(Integer idUser, Integer idTransition) {
		// TODO Auto-generated method stub
		return mainDao.validaExistenciaCliente(idUser, idTransition);
	}

	@Override
	public List<ListaTablaBean> getCopClient(String companyName, Integer tipoUsuario) throws SQLException {
		// TODO Auto-generated method stub
		return mainDao.getCopClient(companyName, tipoUsuario);
	}

}
